package com.liang.rabbitmqspringboot.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DeadRabbitMqConfiguration {
//: 声明注册fanout模式的交换机

    @Bean
    public DirectExchange deadDirect(){
    return new DirectExchange("dead_direct_exchange",true,false);
        }


        //队列过期时间
    @Bean
    public Queue deadqueue(){
        return new Queue("dead.direct.queue",true);
    }

@Bean
    public Binding deadBingding(){
        return BindingBuilder.bind(deadqueue()).to(deadDirect()).with("dead");
    }


}
